<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <script src="../study/js/vue.js"></script>
</head>
<body>
<div id="box">
  <input type="text"  @keydown.caps-lock="showInfo">
    <h2 v-if="qh">{{msg}}</h2>

</div>
</body>
<script>
    Vue.config.productionTip = false
    Vue.config.keyCodes.capslock = 20
  new Vue({
    el:'#box',
  data:{
      msg: '当前切换成大写模式',
      qh:false
  },
  methods:{
        showInfo(){
            this.qh = !this.qh
        }
  }
  }
  )
</script>


</html>